const Storage = {
    set (key, value) {
        if (value && typeof value === 'object') {
            window.localStorage.setItem(key, JSON.stringify(value))
            return
        } else {
            window.localStorage.setItem(key, value)
        }
    },

    get (key) {
        return window.localStorage.getItem(key)
    },
    remove (key) {
        window.localStorage.removeItem(key)
    }
}

export { Storage }